package com.ardo.controller;

import com.ardo.service.UserService;
import com.ardo.utils.AppUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;

    /**
     * 账资信息
     * @param request
     * @return
     */
    @RequestMapping("/amount")
    public String amount(HttpServletRequest request) {
        AppUtils.printTitle("C002 - 查询用户账资信息");
        String token  = request.getParameter("token");
        String result = userService.amount(token);
        System.out.println("用户账资结果:" + result);
        return result;
    }
}
